package com.hellowx.qydcdev.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 订单对应商品(OrderGoods)表实体类
 *
 * @author hellowx
 * @since 2022-01-10 10:29:55
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class OrderGoods extends Model<OrderGoods> {

    /**
     * 商品id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long goodsId;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 订单id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderId;

    /**
     * 商品数量
     */
    private Integer goodsNum;

    /**
     * 单价(单位 : 分)
     */
    private Integer price;

    @TableField(exist = false)
    private String image;


}

